package cs304.p3.library.domain;

import java.util.Date;
import java.util.List;

import cs304.p3.library.framework.IoC;

public class Borrower {
	
	private String bid;
	private String password;
	private String name;
	private String address;
	private String phone;
	private String emailAddress;
	private String sinOrStNo;
	private Date expiryDate;
	private String type;
	private String fid;

	private List<BookCopy> booksBorrowed;
	private List<Fine> fines;
	private List<HoldRequest> holdRequests;
	private List<String> holdRequestStrings;

	public Borrower() {
		// lol ... lol
		this(null, null, null, null, null, null, null, null, null, null, null, null);
	}

	public Borrower(String bid, String password, String name, String address, String phone,
			String emailAddress, String sinOrStNo, Date expiryDate, String type) {
		this(bid, password, name, address, phone, emailAddress, sinOrStNo, expiryDate, type, null, null, null);
	}

	public Borrower(String bid, String password, String name, String address, String phone,
			String emailAddress, String sinOrStNo, Date expiryDate, String type,
			List<BookCopy> booksBorrowed, List<Fine> fines, List<HoldRequest> holdRequests) {
		this.bid = bid;
		this.password = password;
		this.name = name;
		this.address = address;
		this.phone = phone;
		this.emailAddress = emailAddress;
		this.sinOrStNo = sinOrStNo;
		this.expiryDate = expiryDate;
		this.type = type;
		this.booksBorrowed = booksBorrowed;
		this.fines = fines;
		this.holdRequests = holdRequests;
	}
	
	public void displayString(){
		StringBuilder display = new StringBuilder();
		display.append("Bid: ");
		display.append(bid);
		display.append("\n");
		display.append("Password: ");
		display.append(password);
		display.append("\n");
		display.append("Name: ");
		display.append(name);
		display.append("\n");
		display.append("Address: ");
		display.append(address);
		display.append("\n");
		display.append("Phone: ");
		display.append(phone);
		display.append("\n");
		display.append("email: ");
		display.append(emailAddress);
		display.append("\n");
		display.append("Sin/St No: ");
		display.append(sinOrStNo);
		display.append("\n");
		display.append("Expiry Date: ");
		display.append(expiryDate);
		display.append("\n");
		display.append("Type: ");
		display.append(type);
		IoC.displayCompleteMessage(display.toString());
	}
	
	public void setFid(String fid){
		this.fid = fid;
	}
	
	public String getFid(){
		return fid;
	}

	public void setBid(String bid) {
		this.bid = bid;
	}

	public String getBid() {
		return bid;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword() {
		return password;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddress() {
		return address;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPhone() {
		return phone;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setSinOrStNo(String sinOrStNo) {
		this.sinOrStNo = sinOrStNo;
	}

	public String getSinOrStNo() {
		return sinOrStNo;
	}

	public void setExpiryDate(Date expiryDate) {
		this.expiryDate = expiryDate;
	}

	public Date getExpiryDate() {
		return expiryDate;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setBooksBorrowed(List<BookCopy> booksBorrowed) {
		this.booksBorrowed = booksBorrowed;
	}

	public List<BookCopy> getBooksBorrowed() {
		return booksBorrowed;
	}

	public void setFines(List<Fine> fines) {
		this.fines = fines;
	}

	public List<Fine> getFines() {
		return fines;
	}
	
	public void setHoldRequestStrings(List<String> strings){
		holdRequestStrings = strings;
	}
	
	public List<String> getHoldRequestStrings(){
		return holdRequestStrings;
	}

	public void setHoldRequests(List<HoldRequest> holdRequests) {
		this.holdRequests = holdRequests;
	}

	public List<HoldRequest> getHoldRequests() {
		return holdRequests;
	}

}
